
from django.conf.urls import url,include
from django.contrib import admin
from . import views
urlpatterns = [

    url(r'^register/',views.RegisterView.as_view(),name='register' ),
    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameCountView.as_view()),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view()),
    #http://www.meiduo.site:8000/image_codes/e3d10554-6725-4f0b-8c54-b16329470f06/
    url(r'^image_codes/(?P<uuid>[\w-]+)/$', views.ImageCodeView.as_view()),
    #http://www.meiduo.site:8000/sms_codes/13278907677/?image_code=4ojs&image_code_id=3e481e40-8d5c-4f76-8cdd-5093b3b01b52
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SMSCodeView.as_view()),
    url(r'^browse_histories/$', views.UserBrowseHistory.as_view()),
    #显示忘记密码页面
    url(r'^find_password/$', views.FindPassword.as_view(),name='findpassword'),
    #核对用户名和图片验证码是否正确
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/sms/token/$', views.VerifyAccounts.as_view()),
    #发送短信验证码
    url(r'^find_password_sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.VerifyMobile.as_view()),
    #核实短信验证码
    url(r'^accounts/(?P<mobile>[a-zA-Z0-9_-]{5,20})/password/token/$', views.VerifySmscode.as_view()),
    #修改密码
    url(r'^users/(?P<user_id>\d+)/new_password/$', views.NewPwd.as_view()),


]
